<script>
AdminMediaLibraryFuncs.current_folder={{JSON:cfolder}};
AdminMediaLibraryFuncs.files={{JSON:files}};
AdminMediaLibraryFuncs.folders={{JSON:folders}};
</script>
<div class="AdminMediaLibrary AdminMediaLibrary-{{result_style}}">
	<div class="header">
		<div class="left_header_block">
			<div class="title">MediaLibrary</div>
			<div class="cl"></div>
		</div>
		<div class="right_header_block">
			<div class="buttons">
				
				<div class="buttons_group">
					<a class="button button-list" href="{{action}}?{{call Helpers.copy_fields({skip:["result_style"]})}}result_style=list"></a>
					<a class="button button-icons" href="{{action}}?{{call Helpers.copy_fields({skip:["result_style"]})}}result_style=icons"></a>
					<a class="button button-images" href="{{action}}?{{call Helpers.copy_fields({skip:["result_style"]})}}result_style=images"></a>
					<a class="button button-path" href="{{action}}?{{call Helpers.copy_fields({skip:["result_style"]})}}result_style=path"></a>
				</div>
				<!--<div class="button-split"></div>-->
				
				<div class="buttons_group">
					<div class="button button-upload" alt="Upload file" title="Upload file"></div>
					<div class="button button-upload-many" alt="Upload several files" title="Upload several files"></div>
				</div>
				<!--<div class="button-split"></div>-->
				
				<div class="buttons_group">
					<div class="button button-new-folder" alt="Create sub-folder" title="Create sub-folder"></div>
					<div class="button button-edit-folder" alt="Edit current folder" title="Edit current folder"></div>
				</div>
				<!--<div class="button-split"></div>-->
				
				<div class="buttons_group">
					<div class="button button-disabled button-move-files" alt="Move files" title="Move files"></div>
					<div class="button button-disabled button-move-file-folders" alt="Move folders" title="Move folders"></div>
				</div>
				<!--<div class="button-split"></div>-->
				
				<div class="buttons_group">
					<div class="button button-disabled button-delete-files" alt="Delete files" title="Delete files"></div>
					<div class="button button-disabled button-delete-file-folders" alt="Delete folders" title="Delete folders"></div>
				</div>
				{{if fields.target=="ajajform_file_id"}}
					<div class="button-split"></div>
					<div class="button button-disabled button-ajajform-file" alt="Use file" title="Use file"></div>
				{{/if}}
				{{if fields.target=="ajajform_urledit"}}
					<div class="button-split"></div>
					<div class="button button-disabled button-ajajform-urledit" alt="Use file" title="Use file"></div>
				{{/if}}
	<!--			{{if fields.target=="tinymce"}}
					<div class="button-split"></div>
					<div class="button button-disabled button-tinymce" alt="Use file" title="Use file"></div>
				{{/if}}-->
				{{if fields.target=="ajajform_filegroup_id"}}{{if cfolder}}
					<div class="button-split"></div>
					<div class="button button-ajajform-filegroup" alt="Use folder" title="Use folder"></div>
				{{/if}}{{/if}}
				<div class="cl"></div>
			</div>
		</div>
		<div class="cl"></div>
	</div>
{{if result_style=="list"}} {{include "controllers/adminpanel/AdminMediaLibrary/index-list"}} {{/if}}
{{if result_style=="icons"}} {{include "controllers/adminpanel/AdminMediaLibrary/index-icons"}} {{/if}}
{{if result_style=="images"}} {{include "controllers/adminpanel/AdminMediaLibrary/index-images"}} {{/if}}
{{if result_style=="path"}} {{include "controllers/adminpanel/AdminMediaLibrary/index-pathes"}} {{/if}}
	<div class="cl"></div>
</div>
<div class="edit-folder-dialog" title="Edit folder"><div class="form"></div></div>
<div class="upload-file-dialog" title="Upload file"><div class="form"></div></div>
<div class="upload-files-dialog" title="Upload several files"><div class="form"></div></div>
<div class="move-files-dialog" title="Move files"><div class="form"></div></div>
<div class="move-file-folders-dialog" title="Move directories"><div class="form"></div></div>
<script>
AdminMediaLibraryFuncs.init_buttons({{JSON:file_folder}},{{JSON:l10n_all}},{{JSON:preview_sizes}},{{JSON:select_all_file_folders}},{{JSON:select_foldermove_file_folders}});
</script>
